home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / PROGRAMM / PASCAL / 0391B.ZIP / PTOOLWIN.ARC / PTOOLWIN.DOC next >
Text File  |  1985-09-24  |  6KB  |  119 lines

  1.  PTOOLWIN.INC   Copyright 1984  R D Ostrander                   Version 1.0
  2.                                 Ostrander Data Services
  3.                                 5437 Honey Manor Dr
  4.                                 Indianapolis  IN  46241
  5.  
  6.  These Turbo Pascal procedures are text window manipulation tools used to ease
  7.  the manipulation of Windows in an IBM PC environment. They are used to open
  8.  and close windows while saving the data covered by the window. Borders around
  9.  windows are also supported.
  10.  
  11.  This program has been placed in the Public Domain by the author and copies
  12.  may be freely made for non-commercial, demonstration, or evaluation purposes.
  13.  Use of these subroutines in a program for sale or for commercial purposes in
  14.  a place of business requires a $20 fee be paid to the author at the address
  15.  above.  Personal non-commercial users may also elect to pay the $20 fee to
  16.  encourage further development of this and similar programs. With payment you
  17.  will be able to receive update notices, diskettes and printed documentation
  18.  of this and other PTOOLs from Ostrander Data Services.
  19.  
  20.  
  21.  PTOOL, and PTOOLxxx are Copyright Trademarks of Ostrander Data Services
  22.  
  23.  Turbo Pascal is a Copyright of Borland International Inc.
  24.  
  25. Procedures available in PTOOLWIN.INC are:
  26.  
  27.  
  28.  PTWSet  (Screen#, X1, Y1, X2, Y2,  - Sets up window coordinates so that later
  29.          BorderSwitch,                references can be made by Mnemonic only.
  30.          BackgroundColor,             PTWSet must be done once for each window
  31.          ForegroundColor)             before it is Opened.
  32.                                       The Screen# is a number between 1 and
  33.                                       the maximum number of windows allowable
  34.                                       set in the Constants Block below.
  35.                                       The X and Y Coordinates are the same as
  36.                                       for the Turbo Pascal Window procedure.
  37.                                       A border may be placed around the window
  38.                                       and the size of the window will be
  39.                                       decreased to fit inside the border. The
  40.                                       BorderSwitch functions are:
  41.                                          0 - No border
  42.                                          1 - Single line block graphics border
  43.                                          2 - Double line block graphics border
  44.                                         -1 - Single line Reversed color border
  45.                                         -2 - Double line Reversed color border
  46.                                       The BackgroundColor and ForegroundColor
  47.                                       parameters are the same as for the Turbo
  48.                                       Pascal TextColor and TextBackground
  49.                                       procedures.
  50.  
  51.  PTWOpen (Screen#)                  - Activates a window (previously set by
  52.                                       PTWSet) and saves the screen covered by
  53.                                       the window.
  54.                                       In the Constants Block following, there
  55.                                       is a parameter that sets the maximum
  56.                                       number of windows that may be open at
  57.                                       any one time.
  58.  
  59.  PTWClose                           - De-activates the open window, activates
  60.                                       the previous window and restores the
  61.                                       screen covered by the closed window.
  62.                                       Note that the PTWOpen & PTWClose have a
  63.                                       "Push/Pop" type of action.
  64.  
  65.  
  66.  
  67. Constants in the PTOOLWIN.INC file that must be set by the programmer before
  68. compilation are:
  69.  
  70.  
  71.    PTOOLWIN_Number_of_Windows = 10;
  72.  
  73.         This determines the number of windows that may be set with the
  74.         PTWSet procedure. This is easily determined when the calling
  75.         program is designed.
  76.  
  77.  
  78.    PTOOLWIN_Max_Number_Open = 10;
  79.  
  80.         This determines the number of windows that may be open at any one
  81.         time. The programmer will want to set this accurately to the maximum
  82.         number needed by the calling program since 4006 bytes of memory are
  83.         taken for each window that may be opened. This memory is taken in the
  84.         data area at compilation time. This was done in order to allow the
  85.         calling program the widest possible latitude in design; the stack is
  86.         not used for this since running out of memory at execution time would
  87.         be very inconvenient.
  88.  
  89.  
  90.  
  91. There is a constant that must be set before the PTWOpen or PTWClose procedures
  92. are called:
  93.  
  94.  
  95.    PTOOLWIN_Screen_Type : Char = 'C';
  96.  
  97.         If the final program is going to be run on an IBM PC with a Monochrome
  98.         video card then this parameter must be set to 'M'. If the PC has
  99.         a Color/Graphics card then it must be set to 'C'. This setting may be
  100.         done at run time rather than at compile time since the difference that
  101.         this parameter makes is whether to store and recall the screen data at
  102.         $B8000 (Color Graphics) or $B0000 (Monochrome) via the absolute
  103.         variables :
  104.                      PTOOLWIN_C_Screen   : Char absolute $B800:$0000;
  105.                      PTOOLWIN_M_Screen   : Char absolute $B000:$0000;
  106.  
  107.         This may be found in the calling program by using either the
  108.         PTEMonoAttached or PTEColorAttached functions found in the PTOOLENV
  109.         Environment control.
  110.  
  111.  
  112.  
  113.  Now go out and try PTOOLWIN and by all means, look at the code of both
  114.  PTOOLWIN.PAS and PTOOLWIN.INC to completely understand how to incorporate
  115.  the Ostrander Data Services product into your programs.
  116.  
  117.  Write to find out about other ODS software available that might not be
  118.  on this bulletin board.
  119.